#coding=utf-8
__author__ = 'rsg'


import smtplib
from email.mime.text import MIMEText
from email.header import Header

sender = 'renshangui@163.com'
receiver = '277101298@qq.com'
subject = 'python email test'
smtpserver = 'smtp.163.com'
username = 'renshangui@163.com'
password = '3233879'

msg = MIMEText('你好', 'text', 'utf-8')
msg['Subject'] = Header(subject, 'utf-8')

smtp = smtplib.SMTP()
smtp.connect('smtp.163.com')
smtp.login(username, password)
smtp.sendmail(sender, receiver, msg.as_string())
smtp.quit()

